package xt.outfood.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

/**
 * 需要使监听器生效，需要在META-INF下的spring.factories配置监听器所在的类路径
 * @author xiaozhua
 * @date 2022/9/15 10:30
 */
public class MyListener implements ApplicationListener {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println("==================监听器=======================");
        System.out.println(event.getSource());
    }
}
